<template>
    <div class="shop-cart">
        <!--购物车列表-->
        <div class="panel">
            <div class="panel-head">
                <div class="panel-name">购物车</div>
            </div>
            <div class="panel-body">
                <div class="product-list">
                    <div class="product-item">
                        <div class="product-image">
                            <img src="" alt="image"/>
                            <van-checkbox></van-checkbox>
                        </div>
                        <div class="product-info">
                            <div class="product-name">「至臻·玫瑰养颜原液」疏肝解郁内调养肤行气活血</div>
                            <div class="product-price">¥<span>99.00</span></div>
                            <div class="product-number">x1</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    import {Checkbox, CheckboxGroup} from 'vant';
    export default {
        name: "ShopCart",
        components: {
            [Checkbox.name]: Checkbox,
            [CheckboxGroup.name]: CheckboxGroup
        }
    }
</script>

<style lang="scss" scoped>
    .panel {
        background-color: #fff;
        .panel-head {
            padding: 5px;
            border-bottom: 1px solid #eaeaea;
        }
    }
    //商品列表
    .product-list {
        padding: 10px;
        .product-item {
            display: flex;
            background-color: #eaeaea;
            padding: 10px;
            //图片
            .product-image {
                position: relative;
                flex: 0 0 75px;
                .van-checkbox {
                    position: absolute;
                    top: 0;
                    left: 0;
                }
            }
            //信息
            .product-info {
                position: relative;
                margin-left: 10px;
                padding-bottom: 25px;
                .product-name {
                    font-size: 14px;
                    line-height: 25px;
                }
                .product-price {
                    position: absolute;
                    left: 0;
                    bottom: 0;
                    height: 25px;
                    line-height: 25px;
                    font-size: 12px;
                    color: #f30;
                    span {
                        font-size: 16px;
                    }
                }
                .product-number {
                    position: absolute;
                    right: 0;
                    bottom: 0;
                    height: 25px;
                    line-height: 25px;
                    font-size: 12px;
                }
            }
        }
    }
</style>